Skip to content

feat(auth): return user_id from verify-email - #8

Merged
kipavy merged 1 commit into
mainfrom
feat/verify-email-user-id
Aug 17, 2026
Merged

feat(auth): return user_id from verify-email#8
kipavy merged 1 commit into
mainfrom
feat/verify-email-user-id

Conversation

@kipavy

@kipavy kipavy commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Adds user_id to the verify-email response so the portal can build a deep link back into the app.

Why

After verifying an address the portal can only tell the user to go back to the app by hand, where they still have to click "I verified" to refresh the session. The client now handles voltius://verified?u=<users.id> and refreshes itself — but only if the portal knows which user was verified.

This is deliberately users.id and not account_id: account_id is the client's KDF salt, and it must never leave the device. users.id authorises nothing.

What changed

VerifyEmailResponse gains user_id, and the existing CTE returns users.id alongside the email it already returned. No new endpoint, no new token, no change to the token's single-use semantics or to the 410-expired / 400-invalid discrimination below it.

Verification

cargo check clean. This crate has no test harness — server/tests/ does not exist and auth.rs has no mod tests — so cargo check plus the client-side live run is the whole gate. A harness invented for one field would have been the wrong call.

Companion PRs

  • voltius: the route framework and the verified handler
  • web: the portal's "Open Voltius" button

Ship this before the portal, or in either order — the portal gates its button on the field being present, so it degrades to today's card without it.

@kipavy
kipavy merged commit d88ed7d into main Aug 17, 2026
2 checks passed
@kipavy
kipavy deleted the feat/verify-email-user-id branch August 17, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant